#include <iostream>
#include <string>

class Widget {
private:
    std::string Name;

public:
    // void SetName(const std::string& name) { Name = name; }
    // void SetName(std::string&& name) { Name = std::move(name); }

    template<typename T>
    void SetName(T&& t)
    {
        Name = std::forward<T>(t);
    }
};

template<typename T>
T Foo(T&& t)
{
    return std::forward<T>(t);
}

Widget Foo(Widget&& w)
{
    return std::move(w);
}

// ??????
Widget Foo()
{
    Widget w;
    return std::move(w);
}

int main() {

    Widget w;
    w.SetName("Hello Widget!");

    return 0;
}